.addtask {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    /* 添加这行确保内容不会溢出 */
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 20px;
    /* 添加这行确保子元素不会溢出 */
    width: 100%;
    box-sizing: border-box;
}

/* 确保所有输入框和它们的容器都使用 border-box */
input, 
select, 
textarea,
.input-with-prefix {
    width: 100%;
    box-sizing: border-box;
}

input, select, textarea {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4481eb;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.input-with-prefix {
    display: flex;
    align-items: center;
}

.prefix {
    padding: 10px 15px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    color: #666;
}

.input-with-prefix input {
    border-radius: 0 5px 5px 0;
    /* 修改这里，让输入框自适应剩余宽度 */
    flex: 1;
}

/* 其他样式保持不变... */

.prefix {
    padding: 10px 15px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 5px 0 0 5px;
    color: #666;
}

.input-with-prefix input {
    border-radius: 0 5px 5px 0;
}

.file-upload {
    position: relative;
    padding: 30px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #4481eb;
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-text {
    color: #666;
}

.upload-tip {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.form-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(-45deg, #4481eb 0, #04befe 100%);
    color: white;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(68, 129, 235, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .addtask {
        margin: 15px;
        padding: 15px;
    }
}